﻿// JScript 文件

function CViewMgr()
{
    this.m_viewLeftMenu = new LeftMenu();
    this.m_viewPanel = new Panel();
    this.m_viewLblCheckItem = document.getElementById("lblCheck");    
    this.m_viewPagePannel = new PagePannel();
    
    //显示左边菜单
    this.ShowLeftMenu = function(object, menuArray)
    {
        this.m_viewLeftMenu.AddMenuItem(object, menuArray);
    }
    
    //显示右边数据
    this.ShowPanel = function(object, dataArray)
    {
        this.m_viewPanel.ShowPanel(dataArray);
        this.ShowPage(object);
    }
    
    //显示选中的项目
    this.ShowCheck = function(ImgID)
    {
        var obj = document.getElementByID(ImgID);
        alert(obj);
//        var divCheckedItem = '<div class="divCheckItem" onmouseover="ShowMove(this);" onmouseleave="HideMove(this);" >' +
//            '<div class="divCheckImg">' + 
//                '<img  src="' + obj.src + '" alt="" onload="resizeImage(this, 139, 104);" />' +
//            '</div>' +
//            '<div class="divRemove"><img src="../../images/drop-no.gif" alt="" onclick="RemoveItem(this);" style="cursor:hand;" /></div>' +
//        '</div> ';
//        document.getElementById("divChecked").innerHTML += divCheckedItem;
//        if(obj.checked)
//        {
//            this.m_viewLblCheckItem.innerHTML += "|" + obj.value;
//        }
//        else
//        {
//            this.m_viewLblCheckItem.innerHTML = this.m_viewLblCheckItem.innerHTML.replace("|" + obj.value, "");
//        }
    }
    
    //显示分页
    this.ShowPage = function(object)
    {
        this.m_viewPagePannel.PageChangeShow(object);
    }
}

CViewMgr.sm_viewMgr = new CViewMgr();